package nl.hanze.designpatterns;

import nl.hanze.designpatterns.DAO.impl.file.crypted.LoginCredentialFDAOImpl;
import nl.hanze.designpatterns.DAO.impl.file.ser.QuestionFDAOImpl;
import nl.hanze.designpatterns.Domain.Answer;
import nl.hanze.designpatterns.Domain.LoginCredential;
import nl.hanze.designpatterns.Domain.Question;
import nl.hanze.designpatterns.db.Executor;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Iterator;

/**
 *
 * Created by Aron on 6-10-2014.
 */
public class GenerateLoginCredentialsSerialized {

    public static void main(String [] args) {
        generate();
    }

    public static void generate() {
        ArrayList<LoginCredential> loginCredentials = new ArrayList<LoginCredential>();

        loginCredentials.add(new LoginCredential("test", "test"));
        loginCredentials.add(new LoginCredential("username", "password"));

        LoginCredentialFDAOImpl.Serialize(loginCredentials);
        ArrayList<LoginCredential> loginCredentialsResult = LoginCredentialFDAOImpl.Deserialize();
        System.out.println(loginCredentialsResult.size());
    }
}
